﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using ChuangDu_Spirit_QGB_IBLL;
using ChuangDu_Spirit_QGB_Model;
using ChuangDu_Spirit_QGB_BLLContainer;
using ChuangDu_Spirit_QGB_BLL;
namespace ChuangDu_Spirit_QGB.Controllers
{
    public class DefaultController : Controller
    {
        private IUserBLL userbll = BLLContainer.Resolve<UserBLL,IUserBLL>();
        // GET: Default
        public ActionResult Index()
        {
            IEnumerable<info> list = userbll.show();
            return View(list);
        }
        public ActionResult Details(info t)
        {
            int i = userbll.Delete(t);
            return View();
        }
        public ActionResult Edit(info t)
        {
            t.name = "防护";
            t.sex = "女";
            t.age = "男";
            int i = userbll.Update(t);
            return View();
        }
        public ActionResult ADD()
        {
            info f = new info();
            f.name = "防护11";
            f.sex = "女";
            f.age = "123";
            int i = userbll.Add(f);
            return View();
        }
    }
}